/*
 * @Author: your name
 * @Date: 2021-05-22 21:52:40
 * @LastEditTime: 2021-05-30 22:14:55
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: /xiangpan-admin/src/pages/order/index.tsx
 */
import { IForm } from '@/components/form/interface';
import { Card, Table, TablePaginationConfig, Tabs } from 'antd';
import React from 'react';
import { IFormTypeEnum } from '@/components/form/formComponent';
import HeaderForm from '@/components/form';
import { useRequest } from '@/.umi/plugin-request/request';
import { get_admin_list, get_recharge_list } from '@/services/pages';
import initPagination from '@/use/initPagination';
import useObj from '@/use/useObj';
import { formatDateTime } from '../../utils/utils';
import { useEffect } from 'react';
import Recharge from './recharge/index';
import Consumption from './consumption';
import AllOrder from './allOrder';

interface IProps {}

const Order = (props: IProps) => {
  const [obj, setObj] = useObj({
    activeKey: '1',
  });

  return (
    <Card title="订单管理">
      <Tabs onChange={(e) => setObj({ activeKey: e })}>
        <Tabs.TabPane key={'1'} tab="订单记录">
          <AllOrder />
        </Tabs.TabPane>
        <Tabs.TabPane key={'2'} tab="充值记录">
          <Recharge />
        </Tabs.TabPane>
        <Tabs.TabPane key={'3'} tab="消费记录">
          <Consumption />
        </Tabs.TabPane>
      </Tabs>
    </Card>
  );
};
export default Order;
